<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue双向数据绑定</title>
    <script src="vue.js"></script>
</head>
<body>
<div id="app">
    <input type="text" v-model="name">{{name}} {{age}} {{flag}}
    <hr />
    {{sayHi()}}
    <hr />
    {{[1,2,3,4,5][2]}}
    <hr />
    {{ {name:"周杰伦", age:36} }}
    <hr />
    {{ {name:"周杰伦", age:36}.name }}
</div>
<script>
    new Vue({
        el: "#app", //el:当前的VUE对象耀邦定到页面上的那个元素
        data: {  //声明的数据json对象
            name: "刘德华",
            age: 60,
            flag: true


        },
        methods: {
            sayHi: function () {
                return "hello vue";
            }
        }
    });
</script>
</body>
</html>